package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

@Controller("userService")
public class UserServiceImpl implements UserService {
    @Value("3")
    private int num;
    @Value("itheima")
    private String version;


    @Autowired
    @Qualifier("userDao")
    private UserDao userDao;
    public void save() {
        System.out.println("user service running..." + num + " " + version);
        userDao.save();
    }

    public void init(){
        System.out.println("user servier init...");
    }

    public void destroy(){
        System.out.println("user servier destroy...");
    }

}
